package com.star.dao;

import com.star.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserDao {
    User findByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    Integer addUser(@Param("user") User user);

    Integer updateUser(@Param("user") User user);

    Integer deleteById(Integer id);

    User getById(Integer id);

    List<User> getList();
}